package iamutkarshtiwari.github.io.ananas.editimage.gesture;

import iamutkarshtiwari.github.io.ananas.editimage.utils.LogUtil;

public class VectorAngle {

    public static float getAngle(Vector2D vector1, Vector2D vector2) {
//        vector1.normalize();
//        vector2.normalize();
        LogUtil.loge("gongmengfei" + "getAngle" + vector1.position[0] + " " + vector1.position[0]);
        double degrees = (180.0 / Math.PI) * (Math.atan2(vector2.position[1], vector2.position[0]) - Math.atan2(vector1.position[1], vector1.position[0]));
        return (float) degrees;
    }
}
